const http = require('http');

const server = http.createServer();

server.on('request', (req, res) => {
  // 跨域
  res.setHeader('Access-Control-Allow-Origin', '*');
  res.setHeader('Access-Control-Allow-Header', '*');
  console.log(req.url);
  res.end('hello');
});

server.listen(3000);
